package a.f.l;

import a.c.e;
import a.c.k;
import a.c.q;
import a.c.z;
import a.d.f;
import a.d.n;
import a.f.*;
import a.f.cb;
import a.f.o;
import a.f.r;
import a.i.l;
import a.i.p;

import java.util.*;

public class i
  extends r
{
  public static final Object g = "y.layout.router.OrthogonalSegmentDistributionStage.AFFECTED_EDGES";
  private static final double h = 0.001D;
  private static final double i = 5.0D;
  private static final double j = 2.0D;
  private o k;
  private boolean l;
  private Comparator m = new Comparator()
  {
    public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
    {
      int n = g.Cc;
      i.f_ localf_1 = (i.f_)paramAnonymousObject1;
      n localn1 = localf_1.c();
      if (n == 0) {}
      int i = localn1.d().b() >= localn1.e().b() ? 1 : 0;
      i.f_ localf_2 = (i.f_)paramAnonymousObject2;
      n localn2 = localf_2.c();
      if (n == 0) {}
      int j = localn2.d().b() >= localn2.e().b() ? 1 : 0;
      if (n == 0) {}
      int k = i != 0 ? i.this.n[localf_1.i.d()] : i.this.o[localf_1.i.d()];
      if (n == 0) {}
      int m = j != 0 ? i.this.n[localf_2.i.d()] : i.this.o[localf_2.i.d()];
      return l.a(k, m);
    }
  };
  private int[] n;
  private int[] o;
  private double p = 10.0D;
  private Object q = g;
  private boolean r;
  private double s = 10.0D;
  private double t;
  private double u;
  private boolean v;
  private boolean w = true;
  private boolean x = true;
  private byte y;
  public static int A;
  
  public boolean canLayout(o paramo)
  {
    int i1 = g.Cc;
    rc localrc = a();
    if ((i1 != 0) || (localrc != null)) {
      if (i1 != 0) {
        break label32;
      }
    }
    label32:
    return localrc.canLayout(paramo);
  }
  
  public void doLayout(o paramo)
  {
    this.k = paramo;
    a(paramo);
    if (g.Cc == 0) {
      if (paramo.m() == 0) {
        return;
      }
    }
    int i1 = paramo.l() * 2;
    byte[] arrayOfByte = new byte[i1 * (i1 - 1) / 2];
    this.y = 0;
    a(paramo, arrayOfByte);
    cb localcb = new cb((byte)3);
    localcb.a(new rc()
    {
      private final byte[] val$adjacencyMatrix;
      
      public boolean canLayout(o paramAnonymouso)
      {
        return true;
      }
      
      public void doLayout(o paramAnonymouso)
      {
        i.this.y = 3;
        i.this.a(paramAnonymouso, this.val$adjacencyMatrix);
      }
    });
    localcb.doLayout(paramo);
    a(arrayOfByte);
    this.v = true;
    this.y = 0;
    c(paramo);
    localcb = new cb((byte)3);
    this.v = false;
    localcb.a(new rc()
    {
      public boolean canLayout(o paramAnonymouso)
      {
        return true;
      }
      
      public void doLayout(o paramAnonymouso)
      {
        i.this.y = 3;
        i.this.c(paramAnonymouso);
      }
    });
    localcb.doLayout(paramo);
  }
  
  private void a(o paramo, byte[] paramArrayOfByte)
  {
    List localList = f(paramo);
    localList.addAll(e(paramo));
    l.a(localList, null);
    a(localList, paramArrayOfByte);
  }
  
  private void c(o paramo)
  {
    List localList = f(paramo);
    localList.addAll(e(paramo));
    l.a(localList, null);
    a(localList);
  }
  
  private void a(List paramList)
  {
    int i4 = g.Cc;
    int i3 = g.Bc;
    ArrayList localArrayList = new ArrayList();
    double d = -1.797693134862316E+308D;
    f localf = new f(-1.797693134862316E+308D);
    int i1 = 0;
    if (i1 < paramList.size()) {}
    label334:
    label339:
    while (i4 != 0)
    {
      d_ locald_ = (d_)paramList.get(i1);
      int i2 = locald_.b();
      if ((i4 == 0) && (i3 != 0)) {
        return;
      }
      if (i4 == 0) {
        if (i2 == 0)
        {
          if (i4 == 0) {
            if (Math.abs(locald_.a() - d) < 5.0D)
            {
              localArrayList.add(locald_);
              if (i4 != 0) {
                break label339;
              }
              if (i3 == 0) {
                break label334;
              }
            }
          }
          if (i4 == 0)
          {
            if (localArrayList.size() > 0) {
              a(localArrayList, localf, i1, paramList);
            }
            localArrayList.add(locald_);
            d = locald_.a();
          }
          if (i4 != 0) {
            break label339;
          }
          if (i3 == 0) {
            break label334;
          }
        }
      }
      g_ localg_;
      if (i4 == 0)
      {
        if (i2 == 2)
        {
          if (localArrayList.size() > 0) {
            a(localArrayList, localf, i1, paramList);
          }
          localg_ = (g_)locald_;
          localf.c(localg_.d().d().b() - 2.0D, localg_.d().e().b() + 2.0D, locald_.a());
          if (i4 != 0) {
            break label339;
          }
          if (i3 == 0) {}
        }
        else
        {
          if (i4 != 0) {
            break label339;
          }
        }
      }
      else if (i2 == 1)
      {
        if (localArrayList.size() > 0) {
          a(localArrayList, localf, i1, paramList);
        }
        localg_ = (g_)locald_;
        localf.c(localg_.d().d().b(), localg_.d().e().b(), locald_.a());
      }
      i1++;
      if (i3 == 0) {
        break;
      }
    }
    a(localArrayList, localf, paramList.size(), paramList);
  }
  
  private void a(List paramList, byte[] paramArrayOfByte)
  {
    int i4 = g.Cc;
    int i3 = g.Bc;
    ArrayList localArrayList = new ArrayList();
    double d = -1.797693134862316E+308D;
    int i1 = 0;
    if (i1 < paramList.size()) {}
    label253:
    while (i4 != 0)
    {
      d_ locald_ = (d_)paramList.get(i1);
      int i2 = locald_.b();
      if (i4 != 0) {
        break label273;
      }
      if (i3 != 0) {
        break label272;
      }
      if (i2 == 0)
      {
        if (i4 == 0) {
          if (Math.abs(locald_.a() - d) < 5.0D)
          {
            localArrayList.add(locald_);
            if (i4 != 0) {
              break label258;
            }
            if (i3 == 0) {
              break label253;
            }
          }
        }
        if (i4 == 0)
        {
          if (localArrayList.size() > 1) {
            c(localArrayList, paramArrayOfByte);
          }
          localArrayList.clear();
          localArrayList.add(locald_);
          d = locald_.a();
        }
        if (i4 != 0) {
          break label258;
        }
        if (i3 == 0) {}
      }
      else if (i4 == 0)
      {
        if (i2 == 2)
        {
          if (i4 == 0)
          {
            if (localArrayList.size() > 1) {
              c(localArrayList, paramArrayOfByte);
            }
            localArrayList.clear();
          }
          if (i4 != 0) {
            break label258;
          }
          if (i3 == 0) {}
        }
        else
        {
          if (i4 != 0) {
            break label258;
          }
        }
      }
      else if (i2 == 1)
      {
        if (i4 == 0) {
          if (localArrayList.size() > 1) {
            c(localArrayList, paramArrayOfByte);
          }
        }
        localArrayList.clear();
      }
      i1++;
      if (i3 == 0) {
        break;
      }
    }
    label258:
    label272:
    if (localArrayList.size() > 1) {
      label273:
      c(localArrayList, paramArrayOfByte);
    }
    localArrayList.clear();
  }
  
  private void a(byte[] paramArrayOfByte)
  {
    int i11 = g.Cc;
    int i10 = g.Bc;
    q localq = new q();
    e[] arrayOfe = new e[this.k.l() * 2];
    int i1 = 0;
    do
    {
      do
      {
        if (i1 >= this.k.l() * 2) {
          break;
        }
        arrayOfe[i1] = localq.i();
        i1++;
        if ((i11 == 0) && (i10 != 0)) {
          break label82;
        }
      } while (i10 == 0);
    } while (i11 != 0);
    i1 = 1;
    label82:
    do
    {
      if (i1 >= this.k.l() * 2) {
        break;
      }
      if (i10 != 0) {
        break label208;
      }
      i2 = 0;
      do
      {
        do
        {
          if (i2 >= i1) {
            break label191;
          }
          i3 = paramArrayOfByte[(i1 * (i1 - 1) / 2 + i2)];
          if (i10 != 0) {
            break;
          }
          if (i3 > 0)
          {
            localq.a(arrayOfe[i1], arrayOfe[i2]);
            if (i11 != 0) {
              continue;
            }
            if (i10 == 0) {}
          }
          else
          {
            if (i11 != 0) {
              continue;
            }
            if (i3 < 0) {
              localq.a(arrayOfe[i2], arrayOfe[i1]);
            }
          }
          i2++;
        } while (i10 == 0);
        i1++;
      } while (i11 != 0);
    } while (i10 == 0);
    label191:
    label208:
    int[] arrayOfInt1 = new int[localq.j()];
    int i2 = localq.j() / 2;
    int i3 = 1;
    Object localObject;
    int i4;
    int[] arrayOfInt2;
    do
    {
      for (;;)
      {
        if (i3 != 0)
        {
          a.c.d locald1;
          int i5;
          do
          {
            i3 = 0;
            x.b(localq, arrayOfInt1);
            localObject = localq.w();
            if (!((a.c.m)localObject).e()) {
              break;
            }
            locald1 = ((a.c.m)localObject).a();
            i5 = locald1.e().f();
            i6 = locald1.f().f();
          } while (i11 != 0);
          if (i10 == 0)
          {
            if ((i11 != 0) || (arrayOfInt1[i5] < arrayOfInt1[i6]))
            {
              if (i11 == 0) {}
              i5 = i5 >= i2 ? i5 - i2 : i5 + i2;
              if (i11 == 0) {}
              i6 = i6 >= i2 ? i6 - i2 : i6 + i2;
              localq.a(locald1);
              localq.a(arrayOfe[i5].b(arrayOfe[i6]));
              i3 = 1;
              if (i11 == 0) {
                if (i10 == 0) {
                  continue;
                }
              }
            }
            else
            {
              ((a.c.m)localObject).f();
            }
            if (i10 == 0) {
              break;
            }
          }
        }
      }
      localObject = new a.i.a.d(localq);
      i4 = 1;
      arrayOfInt2 = new int[localq.j()];
    } while (i11 != 0);
    int i6 = 0;
    do
    {
      do
      {
        if (i6 >= arrayOfInt1.length) {
          break;
        }
        arrayOfInt1[i6] = 0;
        i6++;
        if (i11 != 0) {
          break label481;
        }
        if (i10 != 0) {
          break label479;
        }
      } while (i10 == 0);
    } while (i11 != 0);
    i6 = 0;
    label479:
    label481:
    e locale1;
    do
    {
      if (i6 >= arrayOfe.length) {
        break;
      }
      locale1 = arrayOfe[i6];
      if (i10 != 0) {
        break label635;
      }
      if (locale1.d() == 0)
      {
        if (i11 == 0) {}
        int i8 = i6 < i2 ? i6 + i2 : i6 - i2;
        if (i11 == 0)
        {
          if (arrayOfInt1[i8] != 0)
          {
            arrayOfInt1[i6] = (-arrayOfInt1[i8]);
            ((a.i.a.m)localObject).a(locale1, arrayOfInt1[i6]);
            if (i11 != 0) {
              continue;
            }
            if (i10 == 0) {}
          }
          else
          {
            arrayOfInt1[i6] = i4;
            ((a.i.a.m)localObject).a(locale1, i4++);
          }
        }
        else
        {
          if (i11 != 0) {
            continue;
          }
          if (i10 == 0) {}
        }
      }
      else
      {
        arrayOfInt2[i6] = locale1.d();
      }
      i6++;
    } while (i10 == 0);
    if (i11 == 0) {
      label635:
      i6 = 1;
    }
    label766:
    do
    {
      e locale2;
      int i9;
      do
      {
        do
        {
          if (((a.i.a.m)localObject).a()) {
            break;
          }
          locale1 = ((a.i.a.m)localObject).c();
          arrayOfInt1[locale1.f()] = (i6++);
          locald2 = locale1.h();
        } while (locald2 == null);
        locale2 = locald2.f();
        i9 = arrayOfInt2[locale2.f()];
        arrayOfInt2[locale2.f()] -= 1;
        if (i11 != 0) {
          break label862;
        }
      } while (i10 != 0);
      if ((i11 == 0) && (i10 != 0)) {
        break label862;
      }
      if (i11 == 0)
      {
        if (i9 != 1) {
          break label849;
        }
        if (i11 != 0) {
          break label766;
        }
      }
      e locale3 = locale2.f() < i2 ? arrayOfe[(locale2.f() + i2)] : arrayOfe[(locale2.f() - i2)];
      if (i11 == 0) {
        if (arrayOfInt1[locale3.f()] != 0)
        {
          ((a.i.a.m)localObject).a(locale2, -arrayOfInt1[locale3.f()]);
          if (i11 != 0) {
            continue;
          }
          if (i10 == 0) {
            break label849;
          }
        }
      }
      arrayOfInt1[locale2.f()] = i4;
      ((a.i.a.m)localObject).a(locale2, i4++);
      a.c.d locald2 = locald2.i();
    } while (i10 == 0);
    label849:
    label862:
    int i7 = 0;
    if (i7 < arrayOfInt1.length) {}
    do
    {
      arrayOfInt1[i7] = (-arrayOfInt1[i7]);
      i7++;
      if ((i11 == 0) && (i10 != 0)) {
        return;
      }
      if (i10 == 0) {
        break;
      }
      this.n = new int[this.k.l()];
      this.o = new int[this.k.l()];
      System.arraycopy(arrayOfInt1, 0, this.n, 0, this.n.length);
    } while (i11 != 0);
    System.arraycopy(arrayOfInt1, this.n.length, this.o, 0, this.o.length);
  }
  
  private k d(o paramo)
  {
    Object localObject = paramo.c(this.q);
    if (g.Cc == 0) {
      if (localObject == null) {
        localObject = new p()
        {
          public boolean getBool(Object paramAnonymousObject)
          {
            if (g.Cc == 0) {
              if ((paramAnonymousObject instanceof a.c.d)) {
                return true;
              }
            }
            return false;
          }
        };
      }
    }
    return localObject;
  }
  
  private void a(List paramList1, f paramf, int paramInt, List paramList2)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    Object localObject;
    if ((i3 != 0) || (paramList1.size() < 2))
    {
      if (i3 == 0)
      {
        if (paramList1.size() > 0)
        {
          localObject = (f_)paramList1.get(0);
          a(paramf, (f_)localObject);
        }
        paramList1.clear();
      }
      if (i2 == 0) {}
    }
    else
    {
      localObject = new ArrayList(paramList1.size() * 2);
      Iterator localIterator1 = paramList1.iterator();
      label277:
      do
      {
        f_ localf_;
        double d2;
        double d4;
        do
        {
          do
          {
            do
            {
              if (!localIterator1.hasNext()) {
                break label280;
              }
              localf_ = (f_)localIterator1.next();
              if (i2 != 0) {
                break label292;
              }
              if (!localf_.j()) {
                break;
              }
              a(paramf, localf_);
            } while (i3 != 0);
          } while (i2 == 0);
          d2 = localf_.c().d().b();
          d4 = localf_.c().e().b();
          if (i3 != 0) {
            break label277;
          }
          if (d2 > d4) {
            break;
          }
          ((List)localObject).add(new e_((byte)3, d2, localf_));
          ((List)localObject).add(new e_((byte)4, d4, localf_));
          if (i3 != 0) {
            break label277;
          }
        } while (i2 == 0);
        ((List)localObject).add(new e_((byte)3, d4, localf_));
        ((List)localObject).add(new e_((byte)4, d2, localf_));
      } while (i2 == 0);
      label280:
      l.a((List)localObject, null);
      if (i3 == 0)
      {
        label292:
        int i1 = 0;
        double d1 = 0.0D;
        double d3 = 0.0D;
        ArrayList localArrayList = new ArrayList();
        Iterator localIterator2 = ((List)localObject).iterator();
        label393:
        label411:
        label436:
        do
        {
          do
          {
            do
            {
              e_ locale_;
              do
              {
                if (!localIterator2.hasNext()) {
                  break label514;
                }
                locale_ = (e_)localIterator2.next();
                if (i3 != 0) {
                  break label436;
                }
                if (locale_.b() != 3) {
                  break;
                }
                if (i3 == 0)
                {
                  if (i1 == 0) {
                    d1 = locale_.a();
                  }
                }
                else
                {
                  if (i3 != 0) {
                    break label411;
                  }
                  if (i2 == 0) {
                    break label393;
                  }
                }
                d1 = Math.min(locale_.a(), d1);
                localArrayList.add(locale_.c());
                i1++;
                if (i3 != 0) {
                  break label436;
                }
              } while (i2 == 0);
              i1--;
              d3 = Math.max(locale_.a(), d3);
            } while (i1 != 0);
            if ((i3 != 0) || (i2 != 0)) {
              break label515;
            }
            if (i3 == 0)
            {
              if (localArrayList.size() > 1)
              {
                f localf = a(paramInt, paramList2, localArrayList, d1 - 10.0D, d3 + 10.0D);
                a(localArrayList, paramf, localf);
              }
              localArrayList.clear();
            }
          } while (i3 != 0);
        } while (i2 == 0);
        label514:
        label515:
        paramList1.clear();
      }
    }
  }
  
  private void a(f paramf, f_ paramf_)
  {
    double d1 = paramf_.c().d().b();
    double d2 = paramf_.c().e().b();
    double d3 = Math.min(d1, d2);
    double d4 = Math.max(d1, d2);
    paramf.c(d3, d4, paramf_.c().d().a());
  }
  
  private void c(List paramList, byte[] paramArrayOfByte)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    ArrayList localArrayList1 = new ArrayList(paramList.size() * 2);
    Iterator localIterator1 = paramList.iterator();
    if (localIterator1.hasNext()) {}
    label199:
    while (i3 != 0)
    {
      f_ localf_ = (f_)localIterator1.next();
      if (i2 != 0) {
        break label213;
      }
      if (localf_.j()) {
        break;
      }
      double d2 = localf_.c().d().b();
      double d4 = localf_.c().e().b();
      if (i3 == 0)
      {
        if (d2 <= d4)
        {
          localArrayList1.add(new e_((byte)3, d2, localf_));
          localArrayList1.add(new e_((byte)4, d4, localf_));
          if (i3 != 0) {
            break label199;
          }
          if (i2 == 0) {
            break;
          }
        }
        localArrayList1.add(new e_((byte)3, d4, localf_));
        localArrayList1.add(new e_((byte)4, d2, localf_));
      }
      if (i2 == 0) {
        break;
      }
    }
    l.a(localArrayList1, null);
    label213:
    int i1 = 0;
    double d1 = 0.0D;
    double d3 = 0.0D;
    ArrayList localArrayList2 = new ArrayList();
    Iterator localIterator2 = localArrayList1.iterator();
    label313:
    label331:
    label356:
    do
    {
      do
      {
        do
        {
          e_ locale_;
          do
          {
            if (!localIterator2.hasNext()) {
              return;
            }
            locale_ = (e_)localIterator2.next();
            if (i3 != 0) {
              break label356;
            }
            if (locale_.b() != 3) {
              break;
            }
            if (i3 == 0)
            {
              if (i1 == 0) {
                d1 = locale_.a();
              }
            }
            else
            {
              if (i3 != 0) {
                break label331;
              }
              if (i2 == 0) {
                break label313;
              }
            }
            d1 = Math.min(locale_.a(), d1);
            localArrayList2.add(locale_.c());
            i1++;
            if (i3 != 0) {
              break label356;
            }
          } while (i2 == 0);
          i1--;
          d3 = Math.max(locale_.a(), d3);
        } while (i1 != 0);
        if (i3 == 0)
        {
          if (localArrayList2.size() > 1) {
            d(localArrayList2, paramArrayOfByte);
          }
          localArrayList2.clear();
        }
      } while (i3 != 0);
    } while (i2 == 0);
  }
  
  private f a(int paramInt, List paramList1, List paramList2, double paramDouble1, double paramDouble2)
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    int i1 = paramList2.size();
    double d1 = -1.797693134862316E+308D;
    Object localObject = paramList2.iterator();
    do
    {
      do
      {
        f_ localf_;
        a.c.d locald;
        do
        {
          if (!((Iterator)localObject).hasNext()) {
            break;
          }
          localf_ = (f_)((Iterator)localObject).next();
          locald = localf_.i();
          if (i5 == 0) {
            if (localf_.l())
            {
              localzc = ((o)locald.c()).d(locald.e());
              d4 = localzc.a() + localzc.c();
              d1 = Math.max(d1, d4 + 1.0D);
            }
          }
        } while (!localf_.m());
        zc localzc = ((o)locald.c()).d(locald.e());
        double d4 = localzc.a() + localzc.c();
        d1 = Math.max(d1, d4 + 1.0D);
      } while (i5 != 0);
    } while (i4 == 0);
    localObject = new f(1.7976931348623157E+308D);
    double d2 = ((d_)paramList1.get(paramInt - 1)).a() + j() * (i1 + 1);
    double d3 = d2;
    int i2 = paramInt;
    if (i2 < paramList1.size()) {}
    label317:
    label322:
    while (i5 != 0)
    {
      d_ locald_ = (d_)paramList1.get(i2);
      d3 = locald_.a();
      if ((i5 == 0) && (i4 != 0)) {
        break label591;
      }
      if (i5 == 0) {
        if (d1 > -1.797693134862316E+308D)
        {
          if (i5 != 0) {
            break label322;
          }
          if (d3 <= d1) {
            break label317;
          }
          continue;
        }
      }
      if ((i5 != 0) || (d3 <= d2))
      {
        int i3 = locald_.b();
        if ((i5 != 0) || (i3 != 0))
        {
          g_ localg_;
          double d5;
          double d6;
          if (i5 == 0)
          {
            if (i3 == 2)
            {
              localg_ = (g_)locald_;
              d5 = localg_.d().d().b();
              d6 = localg_.d().e().b();
              if (i5 != 0) {
                break label564;
              }
              if (d6 > paramDouble1)
              {
                if (i5 != 0) {
                  break label564;
                }
                if (d5 < paramDouble2)
                {
                  d5 = Math.max(paramDouble1, d5);
                  d6 = Math.min(d6, paramDouble2);
                  ((f)localObject).a(d5, d6, locald_.a());
                  if (i5 != 0) {
                    break label564;
                  }
                  if (i4 == 0) {}
                }
              }
            }
            else
            {
              if (i5 != 0) {
                break label564;
              }
            }
          }
          else if (i3 == 1)
          {
            localg_ = (g_)locald_;
            d5 = localg_.d().d().b() - 2.0D;
            d6 = localg_.d().e().b() + 2.0D;
            if (i5 != 0) {
              break label564;
            }
            if (d6 > paramDouble1)
            {
              if (i5 != 0) {
                break label564;
              }
              if (d5 < paramDouble2)
              {
                d5 = Math.max(d5, paramDouble1);
                d6 = Math.min(d6, paramDouble2);
                ((f)localObject).a(d5, d6, locald_.a());
              }
            }
          }
        }
        i2++;
        if (i4 == 0) {
          break;
        }
      }
    }
    label564:
    ((f)localObject).a(paramDouble1 - 20.0D, paramDouble2 + 20.0D, d3);
    label591:
    return localObject;
  }
  
  private void a(List paramList, f paramf1, f paramf2)
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    h_ localh_ = new h_();
    localh_.d((0.0D / 0.0D));
    localh_.a(this.m);
    if (i5 == 0) {
      if (this.r)
      {
        localh_.a(this.s);
        if (i5 == 0) {}
        localh_.b(this.v ? this.t : this.u);
      }
    }
    double d2 = this.s;
    int i1 = 0;
    int i2 = 0;
    break label326;
    label97:
    double d1 = j();
    localh_.d();
    Iterator localIterator1 = paramList.iterator();
    if (localIterator1.hasNext()) {}
    f_ localf_;
    do
    {
      localf_ = (f_)localIterator1.next();
      n localn = localf_.c();
      if (i5 != 0) {
        break label226;
      }
      localh_.a(localf_, 0.0D, d1, localn.d().b(), localf_.e(), localn.e().b(), localf_.g(), localf_.h());
      if (i4 != 0) {
        break label224;
      }
      if (i4 == 0) {
        break;
      }
      localh_.a(paramf2);
      localh_.c(paramf1);
    } while (i5 != 0);
    localh_.m();
    label224:
    label226:
    double d3 = localh_.n();
    int i3 = paramList.size();
    d1 -= d3 / (i3 + 1);
    i1++;
    label319:
    label326:
    do
    {
      do
      {
        if (this.x)
        {
          if (i5 != 0) {
            break label319;
          }
          if (localh_.n() > 0.001D) {
            if (i5 != 0) {
              break label319;
            }
          }
        }
        while (i5 != 0)
        {
          if ((d1 > 0.1D) && (i1 <= 20)) {
            break;
          }
          d2 /= 2.0D;
          localh_.a(d2);
        }
      } while (i4 != 0);
      if ((this.r) && ((i5 == 0) && ((this.w) && ((i5 == 0) && ((localh_.n() > 0.0D) && ((i5 == 0) && ((d2 >= 1.0D) && (i2 <= 20)))))))) {
        break label97;
      }
      if (i5 != 0) {
        break;
      }
    } while (i4 != 0);
    if (localh_.n() > 0.001D) {
      return;
    }
    Iterator localIterator2 = paramList.iterator();
    do
    {
      double d4;
      a.c.d locald;
      do
      {
        do
        {
          do
          {
            if (!localIterator2.hasNext()) {
              break;
            }
            localf_ = (f_)localIterator2.next();
            d4 = localh_.d(localf_);
            locald = localf_.i();
          } while (localf_.j());
        } while (i5 != 0);
      } while (Double.isNaN(d4));
      z localz = ((o)locald.c()).o(locald);
      a.c.v localv1 = localz.b(localf_.k());
      a.d.w localw1 = (a.d.w)localv1.c();
      a.c.v localv2 = localz.b(localf_.k() + 1);
      a.d.w localw2 = (a.d.w)localv2.c();
      localw1 = new a.d.w(d4, localw1.b);
      localw2 = new a.d.w(d4, localw2.b);
      double d5 = Math.min(localw1.b, localw2.b);
      double d6 = Math.max(localw1.b, localw2.b);
      if (i5 == 0)
      {
        if (d5 + 2.0D < d6 - 2.0D)
        {
          d5 += 1.0D;
          d6 -= 1.0D;
        }
        paramf1.b(d5, d6, d4);
        localv1.a(localw1);
        localv2.a(localw2);
        this.k.a(locald, localz);
        if (i5 != 0) {
          return;
        }
      }
    } while (i4 == 0);
    localh_.d();
  }
  
  private void d(List paramList, byte[] paramArrayOfByte)
  {
    int i9 = g.Cc;
    int i8 = g.Bc;
    h_ localh_ = new h_();
    i.h_.b_[] arrayOfb_ = new i.h_.b_[paramList.size()];
    int i1 = 0;
    Object localObject = paramList.iterator();
    if (((Iterator)localObject).hasNext()) {}
    while (i9 != 0)
    {
      f_ localf_1 = (f_)((Iterator)localObject).next();
      n localn1 = localf_1.c();
      arrayOfb_[i1] = localh_.a(localf_1, 0.0D, 10.0D, localn1.d().b(), localf_1.e(), localn1.e().b(), localf_1.g());
      i1++;
      if (i8 == 0) {
        break;
      }
    }
    localObject = new i.h_.c_(null);
    int i2 = this.k.l();
    int i3 = 0;
    label438:
    do
    {
      if (i3 >= arrayOfb_.length) {
        break;
      }
      i.h_.b_ localb_1 = arrayOfb_[i3];
      int i4 = i3 + 1;
      do
      {
        do
        {
          if (i4 >= arrayOfb_.length) {
            break label438;
          }
          i.h_.b_ localb_2 = arrayOfb_[i4];
          int i5 = ((f_)localb_1.c()).i.d();
          int i6 = ((f_)localb_2.c()).i.d();
          if (i8 != 0) {
            break;
          }
          if (i5 != i6)
          {
            int i7 = ((Comparator)localObject).compare(localb_1, localb_2);
            f_ localf_2 = (f_)localb_1.c();
            n localn2 = localf_2.c();
            if (i9 == 0) {}
            boolean bool1 = localn2.d().b() >= localn2.e().b();
            f_ localf_3 = (f_)localb_2.c();
            n localn3 = localf_3.c();
            if (i9 == 0) {}
            boolean bool2 = localn3.d().b() >= localn3.e().b();
            if (i9 == 0)
            {
              if ((localb_1.o == 3) && ((i9 != 0) || (localb_2.o == 3))) {
                i7 = -i7;
              }
              a(i5, i6, bool1, bool2, i2, i7, paramArrayOfByte);
            }
            if (i9 == 0) {}
            if (i9 == 0) {}
            a(i5, i6, !bool1, !bool2, i2, -i7, paramArrayOfByte);
          }
          i4++;
        } while (i8 == 0);
        i3++;
      } while (i9 != 0);
    } while (i8 == 0);
  }
  
  private void a(int paramInt1, int paramInt2, boolean paramBoolean1, boolean paramBoolean2, int paramInt3, int paramInt4, byte[] paramArrayOfByte)
  {
    int i3 = g.Cc;
    if (i3 == 0) {
      if (!paramBoolean1) {
        paramInt1 += paramInt3;
      }
    }
    if (i3 == 0) {
      if (!paramBoolean2) {
        paramInt2 += paramInt3;
      }
    }
    int i1;
    if (i3 == 0) {
      if (paramInt1 < paramInt2)
      {
        i1 = paramInt2;
        paramInt2 = paramInt1;
        paramInt1 = i1;
        paramInt4 = -paramInt4;
      }
    }
    if ((i3 != 0) || (paramInt4 != 0))
    {
      i1 = paramInt1 * (paramInt1 - 1) / 2 + paramInt2;
      int i2 = paramArrayOfByte[i1];
      if (i3 == 0) {
        if (paramInt4 > 0)
        {
          if (i3 == 0)
          {
            if (i2 >= 127) {
              return;
            }
            paramArrayOfByte[i1] = ((byte)(i2 + 1));
          }
          if ((i3 == 0) && (g.Bc == 0)) {
            return;
          }
        }
      }
      if (i2 > -128) {
        paramArrayOfByte[i1] = ((byte)(i2 - 1));
      }
    }
  }
  
  private List e(o paramo)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    ArrayList localArrayList = new ArrayList(paramo.j() * 2);
    a.c.w localw = paramo.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      localArrayList.add(new g_(locale, (byte)0));
      if (i2 == 0)
      {
        if (i1 != 0) {
          break label102;
        }
        localArrayList.add(new g_(locale, (byte)1));
        localw.f();
      }
    } while (i1 == 0);
    label102:
    return localArrayList;
  }
  
  private List f(o paramo)
  {
    int i4 = g.Cc;
    int i3 = g.Bc;
    k localk1 = d(paramo);
    ArrayList localArrayList = new ArrayList();
    k localk2 = paramo.c(ed.a);
    k localk3 = paramo.c(ed.b);
    k localk4 = paramo.c(ad.q);
    k localk5 = paramo.c(ad.r);
    a.c.w localw = paramo.v();
    label255:
    do
    {
      do
      {
        if (!localw.e()) {
          return localArrayList;
        }
        e locale = localw.d();
        a.c.m localm = locale.n();
        do
        {
          if (!localm.e()) {
            break;
          }
          a.c.d locald = localm.a();
          int i1 = 0;
          int i2 = paramo.n(locald).j() - 2;
          if (i4 != 0) {
            break label553;
          }
          if (i3 != 0) {
            break label551;
          }
          a.d.v localv = paramo.n(locald).l();
          do
          {
            do
            {
              if (!localv.e()) {
                break label522;
              }
              n localn = localv.a();
              boolean bool = false;
              if (i3 != 0) {
                break;
              }
              if (!localk1.getBool(locald))
              {
                bool = true;
                if (i4 != 0) {
                  break label454;
                }
                if (i3 == 0) {}
              }
              else
              {
                if (i4 == 0) {
                  if (this.l) {
                    if (i4 == 0)
                    {
                      if (i1 != 0)
                      {
                        if (i4 != 0) {
                          break label255;
                        }
                        if (i1 + 1 != localv.k()) {}
                      }
                      else
                      {
                        bool = true;
                      }
                    }
                    else
                    {
                      if (i4 != 0) {
                        break label454;
                      }
                      if (i3 == 0) {
                        break label430;
                      }
                    }
                  }
                }
                if (i4 == 0) {
                  if (i1 == 0)
                  {
                    if (i4 == 0) {
                      if (!a(locald, localk2)) {
                        if (i4 != 0) {
                          break label298;
                        }
                      }
                    }
                    bool = a(paramo, locald, localk4, true);
                    if (i4 != 0) {
                      break label454;
                    }
                    if (bool) {
                      break label430;
                    }
                    if (i4 != 0) {
                      break label454;
                    }
                    if (i1 != i2) {
                      break label430;
                    }
                    if (i4 == 0) {
                      if (!a(locald, localk3)) {
                        if (i4 != 0) {
                          break label361;
                        }
                      }
                    }
                    bool = a(paramo, locald, localk5, false);
                    if (i4 != 0) {
                      break label454;
                    }
                    if (i3 == 0) {
                      break label430;
                    }
                  }
                }
                if (i4 != 0) {
                  break label454;
                }
                if (i1 == i2)
                {
                  if (i4 == 0) {
                    if (!a(locald, localk3)) {
                      if (i4 != 0) {
                        break label424;
                      }
                    }
                  }
                  bool = a(paramo, locald, localk5, false);
                }
              }
              if (i4 == 0)
              {
                if (Math.abs(localn.d().a() - localn.e().a()) < 0.001D) {
                  localArrayList.add(new f_((byte)0, localn, locald, bool, i1, i1 == 0, i1 == i2));
                }
                localv.f();
                i1++;
              }
            } while (i3 == 0);
            localm.f();
          } while (i4 != 0);
        } while (i3 == 0);
      } while (i4 != 0);
      localw.f();
    } while (i3 == 0);
    label298:
    label361:
    return localArrayList;
  }
  
  private boolean a(o paramo, a.c.d paramd, k paramk, boolean paramBoolean)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    if ((i2 != 0) || (paramk != null))
    {
      Collection localCollection = (Collection)paramk.get(paramd);
      if (i2 == 0) {
        if (localCollection == null) {
          return false;
        }
      }
      Iterator localIterator = localCollection.iterator();
      while (localIterator.hasNext())
      {
        ad localad = (ad)localIterator.next();
        if (localad.b())
        {
          if ((i2 != 0) || (i1 != 0)) {
            break label266;
          }
          zc localzc;
          if (paramBoolean)
          {
            localzc = paramo.d(paramd.e());
            localw = paramo.n(paramd).d();
            if (i2 == 0) {
              if (i1 == 0) {
                break label147;
              }
            }
          }
          else
          {
            localzc = paramo.d(paramd.f());
          }
          a.d.w localw = paramo.n(paramd).e();
          label147:
          double d1 = localzc.a() + 0.5D * localzc.c() + localad.c(this.y);
          double d2 = localzc.b() + 0.5D * localzc.d() + localad.d(this.y);
          double d3 = localw.a();
          double d4 = localw.b();
          if (((i2 != 0) || (Math.abs(d1 - d3) < 0.001D)) && ((i2 != 0) || (Math.abs(d2 - d4) < 0.001D))) {
            return true;
          }
        }
      }
    }
    label266:
    return false;
  }
  
  private boolean a(a.c.d paramd, k paramk)
  {
    int i1 = g.Cc;
    if ((i1 != 0) || (paramk != null))
    {
      cd localcd = (cd)paramk.get(paramd);
      if ((i1 != 0) || (localcd != null))
      {
        if (i1 != 0) {
          break label49;
        }
        if (localcd.a()) {
          return true;
        }
      }
    }
    label49:
    return false;
  }
  
  public void a(Object paramObject)
  {
    this.q = paramObject;
  }
  
  public Object b()
  {
    return this.q;
  }
  
  public boolean c()
  {
    return this.x;
  }
  
  public void a(boolean paramBoolean)
  {
    this.x = paramBoolean;
  }
  
  public boolean d()
  {
    return this.w;
  }
  
  public void b(boolean paramBoolean)
  {
    this.w = paramBoolean;
  }
  
  public boolean e()
  {
    return this.r;
  }
  
  public void c(boolean paramBoolean)
  {
    this.r = paramBoolean;
  }
  
  public double f()
  {
    return this.s;
  }
  
  public void a(double paramDouble)
  {
    this.s = paramDouble;
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    this.t = paramDouble1;
    this.u = paramDouble2;
  }
  
  public double g()
  {
    return this.t;
  }
  
  public double h()
  {
    return this.u;
  }
  
  public boolean i()
  {
    return this.l;
  }
  
  public void d(boolean paramBoolean)
  {
    this.l = paramBoolean;
  }
  
  public double j()
  {
    return this.p;
  }
  
  public void b(double paramDouble)
  {
    this.p = paramDouble;
  }
  
  static class h_
  {
    private Map a = new HashMap(11);
    private List b = new ArrayList(62);
    private List c = new ArrayList(62);
    private double d;
    private double e = -1.797693134862316E+308D;
    private double f = 1.7976931348623157E+308D;
    private double g = 10.0D;
    private Map h = new HashMap();
    private List i = new ArrayList();
    private Map j = new HashMap();
    private Set k = new HashSet();
    private f l;
    private f m;
    private double n;
    private double o = 10.0D;
    private boolean p = true;
    private double q = 1.0D;
    private double r = 0.5D;
    private double s;
    private double t;
    private Comparator u;
    private double v;
    private double w;
    private static final boolean x = false;
    private Comparator y;
    private b_[] z;
    private b_[] A;
    private z B;
    private z C;
    private double D;
    private double E;
    
    public double a()
    {
      return this.v;
    }
    
    public void a(double paramDouble)
    {
      this.v = paramDouble;
    }
    
    public double b()
    {
      return this.w;
    }
    
    public void b(double paramDouble)
    {
      this.w = paramDouble;
    }
    
    public Comparator c()
    {
      return this.u;
    }
    
    public void a(Comparator paramComparator)
    {
      this.u = paramComparator;
    }
    
    void c(double paramDouble)
    {
      this.e = paramDouble;
    }
    
    public void d()
    {
      this.s = 0.0D;
      this.k.clear();
      this.j.clear();
      this.i.clear();
      this.h.clear();
      this.a.clear();
      this.b.clear();
      this.c.clear();
      this.t = 0.0D;
      this.d = -1.0D;
    }
    
    public void d(double paramDouble)
    {
      this.n = paramDouble;
    }
    
    public double e()
    {
      return this.n;
    }
    
    public void e(double paramDouble)
    {
      this.t = paramDouble;
    }
    
    public double f()
    {
      return this.t;
    }
    
    public void a(f paramf)
    {
      this.l = paramf;
    }
    
    public void c(f paramf)
    {
      this.m = paramf;
    }
    
    public f g()
    {
      return this.l;
    }
    
    public f h()
    {
      return this.m;
    }
    
    public void a(Object paramObject, double paramDouble1, boolean paramBoolean1, double paramDouble2, boolean paramBoolean2)
    {
      a(paramObject, 0.0D, this.g, paramDouble1, paramBoolean1, paramDouble2, paramBoolean2);
    }
    
    public b_ a(Object paramObject, double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean1, double paramDouble4, boolean paramBoolean2, boolean paramBoolean3)
    {
      b_ localb_ = a(paramObject, paramDouble1, paramDouble2, paramDouble3, paramBoolean1, paramDouble4, paramBoolean2);
      localb_.a(paramBoolean3);
      return localb_;
    }
    
    public b_ a(Object paramObject, double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean1, double paramDouble4, boolean paramBoolean2)
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      b_ localb_;
      if (paramDouble3 > paramDouble4)
      {
        localb_ = b_.a(paramObject, paramDouble1, paramDouble2, paramDouble4, paramBoolean2, paramDouble3, paramBoolean1);
        if (i2 != 0) {
          break label80;
        }
        if (i1 == 0) {}
      }
      else
      {
        localb_ = b_.a(paramObject, paramDouble1, paramDouble2, paramDouble3, paramBoolean1, paramDouble4, paramBoolean2);
      }
      this.a.put(paramObject, localb_);
      label80:
      if (i2 == 0) {
        if (localb_.o == 3)
        {
          this.b.add(localb_);
          if (i2 != 0) {
            break label133;
          }
          if (i1 == 0) {
            break label123;
          }
        }
      }
      this.c.add(localb_);
      label123:
      this.k.add(paramObject);
      label133:
      return localb_;
    }
    
    public b_ a(Object paramObject1, Object paramObject2, double paramDouble1, boolean paramBoolean1, double paramDouble2, boolean paramBoolean2)
    {
      return a(paramObject1, paramObject2, 0.0D, this.g, paramDouble1, paramBoolean1, paramDouble2, paramBoolean2);
    }
    
    public b_ a(Object paramObject1, Object paramObject2, double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean1, double paramDouble4, boolean paramBoolean2)
    {
      z localz = (z)this.h.get(paramObject2);
      if (g.Cc == 0) {
        if (localz == null)
        {
          localz = new z();
          this.h.put(paramObject2, localz);
          this.i.add(localz);
        }
      }
      b_ localb_ = b_.a(paramObject1, paramDouble1, paramDouble2, paramDouble3, paramBoolean1, paramDouble4, paramBoolean2);
      localz.add(localb_);
      this.j.put(paramObject1, localz);
      return localb_;
    }
    
    public Iterator i()
    {
      return this.k.iterator();
    }
    
    public boolean a(Object paramObject)
    {
      return this.k.contains(paramObject);
    }
    
    public boolean b(Object paramObject)
    {
      Object localObject = this.h.get(paramObject);
      if (localObject != null) {
        if (g.Cc != 0) {}
      }
      return this.a.containsKey(localObject);
    }
    
    public void j()
    {
      int i3 = g.Cc;
      int i2 = g.Bc;
      if (i3 == 0)
      {
        if (this.h.size() > 0) {
          o();
        }
        this.z = new b_[this.b.size()];
        this.A = new b_[this.c.size()];
        this.D = 1.7976931348623157E+308D;
        this.E = -1.797693134862316E+308D;
      }
      int i1 = this.b.size() - 1;
      b_ localb_;
      do
      {
        do
        {
          if (i1 < 0) {
            break;
          }
          localb_ = (b_)this.b.get(i1);
          this.E = Math.max(this.E, localb_.g);
          this.D = Math.min(this.D, localb_.f);
          this.z[i1] = localb_;
          i1--;
          if (i3 != 0) {
            break label177;
          }
          if (i2 != 0) {
            break label176;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      i1 = this.c.size() - 1;
      label176:
      label177:
      if (i1 >= 0) {}
      do
      {
        localb_ = (b_)this.c.get(i1);
        this.E = Math.max(this.E, localb_.g);
        this.D = Math.min(this.D, localb_.f);
        this.A[i1] = localb_;
        i1--;
        if ((i3 == 0) && (i2 != 0)) {
          return;
        }
        if (i2 == 0) {
          break;
        }
        this.y = new c_(this.u);
        l.a(this.z, this.y);
        l.a(this.A, this.y);
      } while (i3 != 0);
      k();
    }
    
    private void a(Object[] paramArrayOfObject, Comparator paramComparator)
    {
      int i4 = g.Cc;
      int i3 = g.Bc;
      int i1 = 0;
      label75:
      do
      {
        if (i1 >= paramArrayOfObject.length) {
          break;
        }
        Object localObject1 = paramArrayOfObject[i1];
        int i2 = i1;
        do
        {
          do
          {
            if (i2 >= paramArrayOfObject.length) {
              break label75;
            }
            Object localObject2 = paramArrayOfObject[i2];
            if (i3 != 0) {
              break;
            }
            if (paramComparator.compare(localObject1, localObject2) > 0) {
              throw new InternalError("WooHaa!");
            }
            i2++;
          } while (i3 == 0);
          i1++;
        } while (i4 != 0);
      } while (i3 == 0);
    }
    
    private void k()
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      this.B = new z();
      f.a_ locala_1;
      f.a_ locala_2;
      double d1;
      double d2;
      double d3;
      if (i2 == 0)
      {
        if (this.l != null)
        {
          locala_1 = this.l.e();
          if (i2 == 0) {
            if (this.l.b(locala_1) > this.D) {
              this.B.a(new a_(this.D, -this.f, 0.0D, this.t, false));
            }
          }
          locala_2 = this.l.e();
          do
          {
            if (locala_2 == null) {
              break;
            }
            d1 = this.l.a(locala_2);
            d2 = this.l.b(locala_2);
            if (i1 != 0) {
              break label222;
            }
            if (d1 == 1.7976931348623157E+308D)
            {
              d3 = -this.f;
              if (i2 != 0) {
                continue;
              }
              if (i1 == 0) {}
            }
            else
            {
              d3 = -d1;
            }
            this.B.b(new a_(d2, d3, 0.0D, this.t, false));
            locala_2 = this.l.f(locala_2);
          } while (i1 == 0);
          locala_2 = this.l.f();
          if (i2 != 0) {
            break label373;
          }
          if (this.l.b(locala_2) < this.E)
          {
            label222:
            this.B.b(new a_(this.E, -this.f, 0.0D, this.t, false));
            if (i2 != 0) {
              break label336;
            }
            if (i1 == 0) {}
          }
        }
        else
        {
          this.B.a(new a_(this.D, -this.f, 0.0D, this.t, false));
        }
      }
      else {
        this.B.b(new a_(this.E, -this.f, 0.0D, this.t, false));
      }
      this.C = new z();
      label336:
      if (i2 == 0) {
        if (this.m != null)
        {
          locala_1 = this.m.e();
          if (i2 == 0) {
            label373:
            if (this.m.b(locala_1) > this.D) {
              this.C.a(new a_(this.D, this.e, 0.0D, this.t, false));
            }
          }
          locala_2 = this.m.e();
          if (locala_2 != null) {}
          label505:
          do
          {
            d1 = this.m.a(locala_2);
            d2 = this.m.b(locala_2);
            if (i1 != 0) {
              break label534;
            }
            if (d1 == -1.797693134862316E+308D)
            {
              d3 = this.e;
              if (i2 != 0) {
                break label505;
              }
              if (i1 == 0) {}
            }
            else
            {
              d3 = d1;
            }
            this.C.b(new a_(d2, d3, 0.0D, this.t, false));
            locala_2 = this.m.f(locala_2);
            if (i1 == 0) {
              break;
            }
            locala_2 = this.m.f();
          } while (i2 != 0);
          if (this.m.b(locala_2) >= this.E) {
            return;
          }
          this.C.b(new a_(this.E, this.e, 0.0D, this.t, true));
          if (i2 == 0) {
            if (i1 == 0) {
              return;
            }
          }
        }
        else
        {
          this.C.a(new a_(this.D, this.e, 0.0D, this.t, true));
        }
      }
      label534:
      this.C.b(new a_(this.E, this.e, 0.0D, this.t, true));
    }
    
    private double a(z paramz1, z paramz2)
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      a.c.v localv1 = paramz1.f();
      a.c.v localv2 = paramz2.f();
      double d1 = 0.0D;
      double d2 = -1.797693134862316E+308D;
      label201:
      label204:
      label209:
      label238:
      do
      {
        do
        {
          do
          {
            do
            {
              if ((localv1 == null) || ((i2 == 0) && (localv2 == null))) {
                break label256;
              }
              a_ locala_1 = (a_)localv1.c();
              a_ locala_2 = (a_)localv2.c();
              double d3 = -(locala_2.d + locala_2.f) - (locala_1.d + locala_1.f);
              d2 = Math.max(d2, Math.max(locala_1.g, locala_2.g) - d3);
              if (i2 != 0) {
                break label209;
              }
              if (localv1.a() == null) {
                break label204;
              }
              if (i2 != 0) {
                break label209;
              }
              if (localv2.a() == null) {
                break label204;
              }
              if (i2 != 0) {
                break label201;
              }
              if (((a_)localv1.a().c()).c >= ((a_)localv2.a().c()).c) {
                break;
              }
              localv1 = localv1.a();
              if (i2 != 0) {
                break label201;
              }
            } while (i1 == 0);
            if (i2 != 0) {
              break label209;
            }
            localv2 = localv2.a();
          } while (i1 == 0);
          if (i2 != 0) {
            break label238;
          }
          if (localv2.a() == null) {
            break;
          }
          if (i2 != 0) {
            break label238;
          }
          localv2 = localv2.a();
        } while (i1 == 0);
        if ((i2 == 0) && (localv1.a() == null)) {
          break;
        }
        localv1 = localv1.a();
      } while (i1 == 0);
      label256:
      return -d2;
    }
    
    public double c(z paramz1, z paramz2)
    {
      double d1 = Math.max(this.s, -a(paramz1, paramz2));
      if (g.Cc == 0) {
        if (d1 == -1.797693134862316E+308D) {
          d1 = 0.0D;
        }
      }
      return d1;
    }
    
    public void a(boolean paramBoolean1, boolean paramBoolean2)
    {
      int i4 = g.Cc;
      int i3 = g.Bc;
      if (i4 == 0) {
        if (!paramBoolean1)
        {
          if (i4 != 0) {
            break label123;
          }
          if (!paramBoolean2)
          {
            i1 = 0;
            do
            {
              if (i1 >= this.z.length) {
                break;
              }
              b_ localb_1 = this.z[i1];
              double d1 = localb_1.e();
              double d2 = localb_1.g();
              localb_1.e(-d1);
              localb_1.c(-d2);
              a(this.B, localb_1, 0.0D, false);
              localb_1.a(-localb_1.i);
              localb_1.c(d1);
              localb_1.e(d2);
              i1++;
            } while (i3 == 0);
          }
        }
      }
      label123:
      if (i4 == 0) {
        if (i4 != 0) {}
      }
      if (i4 == 0) {}
      int i1 = paramBoolean2 ? 1 : paramBoolean1 ? 2 : paramBoolean2 ? 0 : 3;
      int i2 = 0;
      do
      {
        if (i2 >= this.A.length) {
          break;
        }
        b_ localb_2 = this.A[i2];
        if (i4 == 0)
        {
          if (localb_2.o == i1) {
            a(this.C, this.A[i2], 0.0D, false);
          }
          i2++;
        }
      } while (i3 == 0);
    }
    
    public void l()
    {
      int i3 = g.Cc;
      int i2 = g.Bc;
      j();
      int i1 = 0;
      b_ localb_;
      do
      {
        do
        {
          if (i1 >= this.z.length) {
            break;
          }
          localb_ = this.z[i1];
          double d1 = localb_.e();
          double d2 = localb_.g();
          localb_.e(-d1);
          localb_.c(-d2);
          a(this.B, localb_, 0.0D, false);
          localb_.a(-localb_.i);
          localb_.c(d1);
          localb_.e(d2);
          i1++;
          if (i3 != 0) {
            break label113;
          }
          if (i2 != 0) {
            break label112;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      i1 = 0;
      label112:
      label113:
      if (i1 < this.A.length) {}
      while (i3 != 0)
      {
        localb_ = this.A[i1];
        a(this.C, localb_, 0.0D, false);
        i1++;
        if ((i3 == 0) && (i2 != 0)) {
          return;
        }
        if (i2 == 0) {
          break;
        }
      }
      this.s = Math.max(this.s, c(this.C, this.B));
    }
    
    public void m()
    {
      int i4 = g.Cc;
      int i3 = g.Bc;
      j();
      int i1 = 0;
      double d2;
      do
      {
        if (i1 >= this.z.length) {
          break;
        }
        localObject = this.z[i1];
        if (i3 != 0) {
          break label113;
        }
        if (!((b_)localObject).b())
        {
          double d1 = ((b_)localObject).e();
          d2 = ((b_)localObject).g();
          ((b_)localObject).e(-d1);
          ((b_)localObject).c(-d2);
          a(this.B, (b_)localObject, 0.0D, false);
          ((b_)localObject).a(-((b_)localObject).d());
          ((b_)localObject).c(d1);
          ((b_)localObject).e(d2);
        }
        i1++;
      } while (i3 == 0);
      if (i4 == 0) {
        label113:
        i1 = 0;
      }
      do
      {
        if (i1 >= this.A.length) {
          break;
        }
        if (i3 != 0) {
          break label179;
        }
        localObject = this.A[i1];
        if (i4 == 0)
        {
          if (((b_)localObject).a() == 0)
          {
            if (i4 != 0) {
              continue;
            }
            if (!((b_)localObject).b()) {
              a(this.C, (b_)localObject, 0.0D, false);
            }
          }
          i1++;
        }
      } while (i3 == 0);
      label179:
      z localz = a(this.B);
      Object localObject = a(this.C);
      int i2 = 0;
      b_ localb_;
      do
      {
        do
        {
          if (i2 >= this.A.length) {
            break;
          }
          localb_ = this.A[i2];
          if (i3 != 0) {
            break label257;
          }
          if (localb_.b()) {
            a((z)localObject, localb_, 0.0D, false);
          }
          i2++;
        } while (i3 == 0);
      } while (i4 != 0);
      label257:
      i2 = this.z.length - 1;
      do
      {
        if (i2 < 0) {
          break;
        }
        localb_ = this.z[i2];
        if (i3 != 0) {
          break label326;
        }
        if (localb_.b()) {
          a((z)localObject, localb_, 0.0D, false);
        }
        i2--;
      } while (i3 == 0);
      this.s = Math.max(this.s, c((z)localObject, this.B));
      if (i4 == 0) {
        label326:
        i2 = 0;
      }
      double d3;
      double d4;
      do
      {
        do
        {
          if (i2 >= this.z.length) {
            break;
          }
          localb_ = this.z[i2];
          if (i3 != 0) {
            break label466;
          }
          if (localb_.b())
          {
            d2 = localb_.e();
            d3 = localb_.g();
            localb_.e(-d2);
            localb_.c(-d3);
            d4 = localb_.d();
            a(localz, localb_, d4, true);
            localb_.a(-localb_.d());
            localb_.a((localb_.i + d4) * 0.5D);
            localb_.c(d2);
            localb_.e(d3);
          }
          i2++;
        } while (i3 == 0);
      } while (i4 != 0);
      label466:
      i2 = this.A.length - 1;
      if (i2 >= 0) {}
      while (i4 != 0)
      {
        localb_ = this.A[i2];
        if ((i4 == 0) && (i3 != 0)) {
          return;
        }
        if (i4 == 0)
        {
          if (localb_.b())
          {
            d2 = localb_.e();
            d3 = localb_.g();
            localb_.e(-d2);
            localb_.c(-d3);
            d4 = localb_.d();
            a(localz, localb_, d4, true);
            localb_.a(-localb_.d());
            localb_.a((localb_.d() + d4) * 0.5D);
            localb_.c(d2);
            localb_.e(d3);
          }
          i2--;
        }
        if (i3 == 0) {
          break;
        }
      }
      this.s = Math.max(this.s, c(this.C, localz));
    }
    
    private z a(z paramz)
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      z localz = new z(paramz);
      a.c.v localv = localz.f();
      if (localv != null) {}
      while (i2 != 0)
      {
        a_ locala_ = (a_)localv.c();
        localv.a(locala_.clone());
        localv = localv.a();
        if (i1 == 0) {
          break;
        }
      }
      return localz;
    }
    
    public double f(double paramDouble)
    {
      return a(paramDouble, 0.0D);
    }
    
    public double a(double paramDouble1, double paramDouble2)
    {
      a_ locala_ = a(this.C, paramDouble1);
      return locala_.d + Math.max(locala_.g, paramDouble2);
    }
    
    public double g(double paramDouble)
    {
      return b(paramDouble, 0.0D);
    }
    
    public double b(double paramDouble1, double paramDouble2)
    {
      a_ locala_ = a(this.B, paramDouble1);
      return -(locala_.d + Math.max(locala_.g, paramDouble2));
    }
    
    public double a(double paramDouble1, double paramDouble2, double paramDouble3)
    {
      return a(this.C, paramDouble1, paramDouble2, paramDouble3);
    }
    
    public double b(double paramDouble1, double paramDouble2, double paramDouble3)
    {
      return -a(this.B, paramDouble1, paramDouble2, paramDouble3);
    }
    
    private double a(z paramz, double paramDouble1, double paramDouble2, double paramDouble3)
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      Object localObject = (a_)paramz.a();
      a.c.v localv = paramz.f().a();
      label157:
      do
      {
        if (localv == null) {
          break;
        }
        a_ locala_1 = (a_)localv.c();
        if (i1 != 0) {
          break label177;
        }
        if (i2 == 0)
        {
          if (locala_1.c > paramDouble1)
          {
            double d1 = ((a_)localObject).d + Math.max(((a_)localObject).g, paramDouble3);
            do
            {
              if (localv == null) {
                break;
              }
              a_ locala_2 = (a_)localv.c();
              if (i1 != 0) {
                break label157;
              }
              if (i2 == 0)
              {
                if (locala_2.c >= paramDouble2) {
                  return d1;
                }
                d1 = Math.max(d1, locala_2.d + Math.max(locala_1.g, paramDouble3));
                localv = localv.a();
              }
            } while (i1 == 0);
            return d1;
          }
          localObject = locala_1;
          localv = localv.a();
        }
      } while (i1 == 0);
      label177:
      return (0.0D / 0.0D);
    }
    
    private a_ a(z paramz, double paramDouble)
    {
      int i2 = g.Cc;
      int i1 = g.Bc;
      Object localObject = (a_)paramz.a();
      a.c.v localv = paramz.f().a();
      do
      {
        if (localv == null) {
          break;
        }
        a_ locala_ = (a_)localv.c();
        if (i2 == 0)
        {
          if (((a_)localObject).c <= paramDouble)
          {
            if (i2 != 0) {
              continue;
            }
            if (locala_.c >= paramDouble) {
              return localObject;
            }
          }
          localObject = locala_;
          localv = localv.a();
        }
      } while (i1 == 0);
      return null;
    }
    
    public void h(double paramDouble)
    {
      int i3 = g.Cc;
      int i2 = g.Bc;
      if (paramDouble == 0.0D) {
        return;
      }
      if (i3 == 0) {
        if (this.l != null) {
          this.l.a(paramDouble);
        }
      }
      int i1 = this.b.size() - 1;
      Object localObject;
      do
      {
        if (i1 < 0) {
          break;
        }
        if ((i3 == 0) && (i2 != 0)) {
          break label115;
        }
        localObject = (b_)this.b.get(i1);
        if (i3 == 0)
        {
          if (!Double.isNaN(((b_)localObject).d())) {
            ((b_)localObject).a(((b_)localObject).d() + paramDouble);
          }
          i1--;
        }
      } while (i2 == 0);
      label115:
      a.c.v localv = this.B.f();
      do
      {
        if (localv == null) {
          break;
        }
        localObject = (a_)localv.c();
        localObject.d -= paramDouble;
        localv = localv.a();
      } while (i2 == 0);
    }
    
    public double n()
    {
      return this.s;
    }
    
    private void o()
    {
      int i4 = g.Cc;
      int i3 = g.Bc;
      int i1 = this.i.size() - 1;
      label192:
      label250:
      do
      {
        Object localObject;
        do
        {
          if (i1 < 0) {
            break;
          }
          double d1 = 1.7976931348623157E+308D;
          double d2 = -1.797693134862316E+308D;
          double d3 = -1.797693134862316E+308D;
          double d4 = 1.7976931348623157E+308D;
          boolean bool1 = true;
          boolean bool2 = true;
          z localz = (z)this.i.get(i1);
          double d5 = 0.0D;
          double d6 = 0.0D;
          localObject = localz.f();
          do
          {
            if (localObject == null) {
              break label283;
            }
            b_ localb_ = (b_)((a.c.v)localObject).c();
            d3 = Math.max(d3, localb_.e());
            d4 = Math.min(d4, localb_.g());
            d6 = Math.max(d6, localb_.j);
            d5 = Math.max(d5, localb_.k);
            if (i3 != 0) {
              break;
            }
            int i2;
            if (localb_.f < d1)
            {
              d1 = localb_.f;
              i2 = localb_.a();
              if (i4 == 0) {
                if (i2 != 2) {
                  if (i4 != 0) {
                    break label192;
                  }
                }
              }
              bool1 = i2 == 0;
            }
            if (i4 == 0)
            {
              if (localb_.g > d2)
              {
                d2 = localb_.g;
                i2 = localb_.a();
                if (i4 == 0) {
                  if (i2 != 1) {
                    if (i4 != 0) {
                      break label250;
                    }
                  }
                }
                bool2 = i2 == 0;
              }
              this.k.add(localb_.c());
              localObject = ((a.c.v)localObject).a();
            }
          } while (i3 == 0);
          localObject = b_.a(localz, d6 * 2.0D, d5, d1, bool1, d2, bool2);
          ((b_)localObject).c(d3);
          ((b_)localObject).e(d4);
          this.a.put(localz, localObject);
        } while (i4 != 0);
        if (i4 == 0) {
          if (((b_)localObject).o == 3)
          {
            this.b.add(localObject);
            if (i4 != 0) {
              continue;
            }
            if (i3 == 0) {
              break label386;
            }
          }
        }
        this.c.add(localObject);
        i1--;
      } while (i3 == 0);
      label283:
    }
    
    public boolean p()
    {
      if (g.Cc == 0) {}
      return this.d > 0.0D;
    }
    
    public double d(Object paramObject)
    {
      double d1 = h(paramObject).d();
      if (g.Cc == 0) {
        if (Double.isNaN(d1)) {
          return this.n;
        }
      }
      return d1;
    }
    
    public double e(Object paramObject)
    {
      return h(paramObject).f;
    }
    
    public double f(Object paramObject)
    {
      return h(paramObject).g;
    }
    
    public double g(Object paramObject)
    {
      return d(this.h.get(paramObject));
    }
    
    private void a(z paramz, b_ paramb_, double paramDouble, boolean paramBoolean)
    {
      int i3 = g.Cc;
      int i2 = g.Bc;
      if (i3 == 0) {
        if (this.p)
        {
          if (i3 != 0) {
            break label59;
          }
          if (Math.abs(paramb_.g - paramb_.f) < this.r)
          {
            paramb_.a((0.0D / 0.0D));
            return;
          }
        }
      }
      label59:
      int i1 = paramb_.a();
      a_ locala_1 = new a_(paramb_.f, 0.0D, paramb_.j, paramb_.k, (i1 == 0) || (i1 == 2));
      a_ locala_2 = new a_(paramb_.g, 0.0D, paramb_.j, paramb_.k, (i1 == 1) || (i1 == 0));
      a.c.v localv1 = paramz.f();
      a_ locala_3 = (a_)localv1.c();
      double d1 = locala_3.d + locala_3.f + Math.max(locala_3.g, paramb_.k);
      a_ locala_4 = locala_3;
      do
      {
        do
        {
          if (paramb_.f - paramb_.j <= locala_3.c + locala_3.f) {
            break;
          }
          d1 = locala_3.d + locala_3.f + Math.max(locala_3.g, paramb_.k);
          locala_4 = locala_3;
          localv1 = localv1.a();
          if (i3 != 0) {
            break label287;
          }
          locala_3 = (a_)localv1.c();
          if (i2 != 0) {
            break label285;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      d1 = Math.max(d1, paramb_.e());
      label285:
      label287:
      if (localv1 != null) {}
      a.c.v localv2;
      do
      {
        if (i3 == 0)
        {
          if (paramb_.f > locala_3.c)
          {
            d1 = Math.max(d1, locala_3.d + locala_3.f + Math.max(locala_3.g, paramb_.k));
            locala_4 = locala_3;
            localv1 = localv1.a();
            locala_3 = (a_)localv1.c();
          }
        }
        else {
          if (i2 == 0) {
            break;
          }
        }
        localv2 = paramz.a(locala_1, localv1);
      } while (i3 != 0);
      double d2 = d1;
      if (paramb_.g >= locala_3.c)
      {
        locala_4 = locala_3;
        d2 = locala_3.d;
        d1 = Math.max(d2 + locala_3.f + Math.max(locala_3.g, paramb_.k), d1);
        paramz.h(localv1);
        localv1 = localv1.a();
      }
      label485:
      do
      {
        while (i3 != 0)
        {
          if (i2 != 0) {
            break label485;
          }
          if (localv1 != null)
          {
            locala_3 = (a_)localv1.c();
            if (i2 == 0) {
              break;
            }
          }
        }
        if (localv1 == null) {
          break label583;
        }
        if (i2 != 0) {
          break label812;
        }
        if (paramb_.g + paramb_.j <= locala_3.c - locala_3.f) {
          break label583;
        }
        d1 = Math.max(locala_3.d + locala_3.f + Math.max(locala_3.g, paramb_.k), d1);
        localv1 = localv1.a();
        if ((i3 == 0) && (localv1 == null)) {
          break label583;
        }
        locala_3 = (a_)localv1.c();
      } while (i2 == 0);
      label583:
      if (i3 == 0)
      {
        if (i3 == 0) {
          if (localv2.b() != null)
          {
            if (i3 != 0) {
              break label718;
            }
            localObject = (a_)localv2.b().c();
            if ((((a_)localObject).c + this.q > paramb_.f) && (((a_)localObject).a != locala_1.a))
            {
              if (i3 != 0) {
                break label718;
              }
              if (localv2.b().b() != null)
              {
                localObject = (a_)localv2.b().b().c();
                d1 = Math.max(d1, ((a_)localObject).d + ((a_)localObject).f + Math.max(((a_)localObject).g, paramb_.k));
              }
            }
          }
        }
        label718:
        if ((i3 != 0) || (localv2.a() != null))
        {
          localObject = (a_)localv2.a().c();
          if (i3 != 0) {
            break label811;
          }
          if ((((a_)localObject).c - this.q < paramb_.g) && (((a_)localObject).a != locala_2.a)) {
            d1 = Math.max(d1, ((a_)localObject).d + ((a_)localObject).f + Math.max(((a_)localObject).g, paramb_.k));
          }
        }
        if (this.v > 0.0D)
        {
          d1 = Math.ceil((d1 - this.w) / this.v) * this.v + this.w;
          if (i3 != 0) {
            break label901;
          }
          if (paramBoolean)
          {
            if (i3 != 0) {
              break label898;
            }
            if (Math.abs(((d1 + paramDouble) * 0.5D - this.w) % this.v) > 0.0D) {
              d1 += this.v;
            }
          }
        }
        d1 += paramb_.j;
      }
      label811:
      label812:
      localv2.a(new a_(paramb_.f, d1, paramb_.j * 2.0D, paramb_.k, (paramb_.o == 2) || (paramb_.o == 0)));
      label898:
      label901:
      Object localObject = paramz.b(new a_(paramb_.g, locala_4.d, locala_4.f * 2.0D, locala_4.g, (paramb_.o == 0) || (paramb_.o == 1)), localv2);
      paramb_.a(d1);
      if (i3 == 0)
      {
        if (d1 - paramb_.g() > this.s) {
          this.s = Math.max(this.s, d1 - paramb_.g());
        }
        this.d = Math.max(this.d, d1);
      }
    }
    
    private b_ h(Object paramObject)
    {
      int i1 = g.Cc;
      b_ localb_ = (b_)this.a.get(paramObject);
      if (i1 == 0) {
        if (localb_ == null)
        {
          Object localObject = this.j.get(paramObject);
          if ((i1 != 0) || (localObject != null)) {
            return (b_)this.a.get(localObject);
          }
          throw new IllegalArgumentException("No such key registered!");
        }
      }
      return localb_;
    }
    
    public boolean q()
    {
      return this.p;
    }
    
    public void a(boolean paramBoolean)
    {
      this.p = paramBoolean;
    }
    
    public double r()
    {
      return this.r;
    }
    
    public void i(double paramDouble)
    {
      this.r = paramDouble;
    }
    
    static class b_
    {
      static final byte a = 0;
      static final byte b = 2;
      static final byte c = 1;
      static final byte d = 3;
      private final Object e;
      private final double f;
      private final double g;
      private double i;
      final double j;
      private final double k;
      private double m;
      private double n;
      private final byte o;
      private boolean p;
      
      private b_(Object paramObject, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, byte paramByte, double paramDouble5, double paramDouble6)
      {
        c(paramDouble5);
        e(paramDouble6);
        this.j = (paramDouble1 * 0.5D);
        this.k = paramDouble2;
        this.e = paramObject;
        a((0.0D / 0.0D));
        this.o = paramByte;
        this.f = paramDouble3;
        if (i2 == 0)
        {
          this.g = paramDouble4;
          switch (paramByte)
          {
          case 0: 
          case 3: 
            c(false);
            if (i2 == 0) {
              if (i1 == 0) {
                return;
              }
            }
          case 1: 
          case 2: 
            if (i2 == 0)
            {
              c(true);
              if (i1 == 0) {
                return;
              }
            }
            break;
          }
        }
        c(true);
      }
      
      public byte a()
      {
        return this.o;
      }
      
      static b_ a(Object paramObject, double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean1, double paramDouble4, boolean paramBoolean2)
      {
        return a(paramObject, paramDouble1, paramDouble2, paramDouble3, paramBoolean1, paramDouble4, paramBoolean2, -1.797693134862316E+308D, 1.7976931348623157E+308D);
      }
      
      static b_ a(Object paramObject, double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean1, double paramDouble4, boolean paramBoolean2, double paramDouble5, double paramDouble6)
      {
        if (paramDouble3 > paramDouble4) {
          return new b_(paramObject, paramDouble1, paramDouble2, paramDouble4, paramDouble3, (byte)(paramBoolean1 ? 1 : paramBoolean2 ? 2 : paramBoolean1 ? 0 : 3), paramDouble5, paramDouble6);
        }
        return new b_(paramObject, paramDouble1, paramDouble2, paramDouble3, paramDouble4, (byte)(paramBoolean2 ? 1 : paramBoolean1 ? 2 : paramBoolean2 ? 0 : 3), paramDouble5, paramDouble6);
      }
      
      public void a(boolean paramBoolean)
      {
        c(paramBoolean);
      }
      
      public boolean b()
      {
        return this.p;
      }
      
      public Object c()
      {
        return this.e;
      }
      
      public double d()
      {
        return this.i;
      }
      
      public void a(double paramDouble)
      {
        this.i = paramDouble;
      }
      
      public double e()
      {
        return this.m;
      }
      
      public void c(double paramDouble)
      {
        this.m = paramDouble;
      }
      
      public double g()
      {
        return this.n;
      }
      
      public void e(double paramDouble)
      {
        this.n = paramDouble;
      }
      
      public void c(boolean paramBoolean)
      {
        this.p = paramBoolean;
      }
    }
    
    static class c_
      implements Comparator, l.j_
    {
      private Comparator a;
      
      public c_(Comparator paramComparator)
      {
        this.a = paramComparator;
      }
      
      public int compare(Object paramObject1, Object paramObject2)
      {
        int k = g.Cc;
        i.h_.b_ localb_1 = (i.h_.b_)paramObject1;
        i.h_.b_ localb_2 = (i.h_.b_)paramObject2;
        int i = localb_1.a();
        int j = localb_2.a();
        if (k == 0) {
          if (i != j) {
            return l.a(i, j);
          }
        }
        if (k == 0) {
          switch (i)
          {
          case 0: 
            if (k == 0) {
              if (localb_1.f == localb_2.f)
              {
                if (k != 0) {
                  break label169;
                }
                if (localb_1.g == localb_2.g) {
                  return (k != 0) || (this.a != null) ? this.a.compare(localb_1.c(), localb_2.c()) : 0;
                }
              }
            }
            if (k == 0) {
              if (localb_1.f >= localb_2.f)
              {
                if (k != 0) {
                  break label207;
                }
                if (localb_1.g <= localb_2.g) {
                  return -1;
                }
              }
            }
            if (k == 0) {
              if (localb_2.f >= localb_1.f)
              {
                if (k != 0) {
                  break label245;
                }
                if (localb_2.g <= localb_1.g) {
                  return 1;
                }
              }
            }
            if (k == 0) {
              if (localb_1.f < localb_2.f) {
                return -1;
              }
            }
            if (k == 0) {
              if (localb_2.f < localb_1.f) {
                return 1;
              }
            }
            return 0;
          case 1: 
            if (k == 0) {
              if (localb_1.f == localb_2.f)
              {
                if (k != 0) {
                  break label358;
                }
                if (localb_1.g == localb_2.g) {
                  return (k != 0) || (this.a != null) ? this.a.compare(localb_1.c(), localb_2.c()) : 0;
                }
              }
            }
            if (k == 0) {
              if (localb_1.f > localb_2.f)
              {
                if (k != 0) {
                  break label396;
                }
                if (localb_1.g < localb_2.g) {
                  return 1;
                }
              }
            }
            if (k == 0) {
              if (localb_2.f > localb_1.f)
              {
                if (k != 0) {
                  break label434;
                }
                if (localb_2.g < localb_1.g) {
                  return -1;
                }
              }
            }
            if (k == 0) {
              if (localb_2.f == localb_1.f)
              {
                if (k == 0) {}
                return localb_1.g < localb_2.g ? -1 : 1;
              }
            }
            if (k == 0) {
              if (localb_2.g == localb_1.g)
              {
                if (k == 0) {}
                return localb_1.f < localb_2.f ? -1 : 1;
              }
            }
            if (k == 0) {
              if (localb_1.f < localb_2.f) {
                return -1;
              }
            }
            if (k == 0) {
              if (localb_2.f < localb_1.f) {
                return 1;
              }
            }
            return 0;
          case 2: 
            if (k == 0) {
              if (localb_1.f == localb_2.f)
              {
                if (k != 0) {
                  break label631;
                }
                if (localb_1.g == localb_2.g) {
                  return (k != 0) || (this.a != null) ? this.a.compare(localb_1.c(), localb_2.c()) : 0;
                }
              }
            }
            if (k == 0) {
              if (localb_1.f > localb_2.f)
              {
                if (k != 0) {
                  break label669;
                }
                if (localb_1.g < localb_2.g) {
                  return -1;
                }
              }
            }
            if (k == 0) {
              if (localb_2.f > localb_1.f)
              {
                if (k != 0) {
                  break label707;
                }
                if (localb_2.g < localb_1.g) {
                  return 1;
                }
              }
            }
            if (k == 0) {
              if (localb_2.f == localb_1.f)
              {
                if (k == 0) {}
                return localb_1.g < localb_2.g ? 1 : -1;
              }
            }
            if (k == 0) {
              if (localb_2.g == localb_1.g)
              {
                if (k == 0) {}
                return localb_1.f < localb_2.f ? 1 : -1;
              }
            }
            if (k == 0) {
              if (localb_1.f < localb_2.f) {
                return 1;
              }
            }
            if (k == 0) {
              if (localb_2.f < localb_1.f) {
                return -1;
              }
            }
            return 0;
          case 3: 
            label169:
            label207:
            label245:
            label631:
            if (k == 0) {
              if (localb_1.f == localb_2.f)
              {
                if (k != 0) {
                  break label904;
                }
                if (localb_1.g == localb_2.g) {
                  return (k != 0) || (this.a != null) ? this.a.compare(localb_2.c(), localb_1.c()) : 0;
                }
              }
            }
            label358:
            if (k == 0) {
              if (localb_1.f >= localb_2.f)
              {
                if (k != 0) {
                  break label942;
                }
                if (localb_1.g <= localb_2.g) {
                  return -1;
                }
              }
            }
            label396:
            label434:
            label707:
            if (k == 0) {
              if (localb_2.f >= localb_1.f)
              {
                if (k != 0) {
                  break label980;
                }
                if (localb_2.g <= localb_1.g) {
                  return 1;
                }
              }
            }
            label669:
            label942:
            label980:
            if (k == 0) {
              if (localb_1.f < localb_2.f) {
                return -1;
              }
            }
            label904:
            if (k == 0) {
              if (localb_2.f < localb_1.f) {
                return 1;
              }
            }
            return 0;
          }
        }
        return 0;
      }
    }
    
    private static class a_
      implements Cloneable
    {
      final boolean a;
      final double c;
      double d;
      final double f;
      final double g;
      
      a_(double paramDouble1, double paramDouble2)
      {
        this(paramDouble1, paramDouble2, 0.0D, 0.0D, true);
      }
      
      a_(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
      {
        this(paramDouble1, paramDouble2, paramDouble3, paramDouble4, true);
      }
      
      a_(double paramDouble1, double paramDouble2, boolean paramBoolean)
      {
        this(paramDouble1, paramDouble2, 0.0D, 0.0D, paramBoolean);
      }
      
      a_(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, boolean paramBoolean)
      {
        this.g = paramDouble4;
        this.c = paramDouble1;
        this.f = paramDouble3;
        this.d = paramDouble2;
        this.a = paramBoolean;
      }
      
      public Object clone()
      {
        try
        {
          return super.clone();
        }
        catch (CloneNotSupportedException localCloneNotSupportedException)
        {
          throw new InternalError();
        }
      }
    }
  }
  
  private static abstract class d_
    implements Comparable, l.j_
  {
    private byte a;
    private double b;
    static final byte c = 0;
    static final byte d = 1;
    static final byte e = 2;
    static final byte f = 3;
    static final byte g = 4;
    
    protected d_(byte paramByte, double paramDouble)
    {
      this.a = paramByte;
      this.b = paramDouble;
    }
    
    public void a(double paramDouble)
    {
      this.b = paramDouble;
    }
    
    public void a(byte paramByte)
    {
      this.a = paramByte;
    }
    
    public int compareTo(Object paramObject)
    {
      int j = g.Cc;
      d_ locald_ = (d_)paramObject;
      int i = l.a(this.b, locald_.a());
      if (j == 0) {
        if (i != 0) {
          return i;
        }
      }
      if (j == 0) {
        switch (b())
        {
        case 0: 
          if (j == 0) {
            switch (locald_.b())
            {
            case 0: 
              return 0;
            case 1: 
              return 1;
            case 2: 
              return -1;
            }
          }
          return 0;
        case 1: 
          if (j == 0) {
            switch (locald_.b())
            {
            case 0: 
              return -1;
            case 1: 
              return 0;
            case 2: 
              return 1;
            }
          }
          return 0;
        case 2: 
          if (j == 0) {
            switch (locald_.b())
            {
            case 0: 
              return 1;
            case 1: 
              return -1;
            case 2: 
              return 0;
            }
          }
          return 0;
        }
      }
      return 0;
    }
    
    public double a()
    {
      return this.b;
    }
    
    public byte b()
    {
      return this.a;
    }
  }
  
  private static class f_
    extends i.d_
  {
    private n h;
    private a.c.d i;
    private boolean j;
    private int k;
    private final boolean l;
    private final boolean m;
    
    public f_(byte paramByte, n paramn, a.c.d paramd, boolean paramBoolean1, int paramInt, boolean paramBoolean2, boolean paramBoolean3)
    {
      super(paramn.d().a());
      this.h = paramn;
      this.i = paramd;
      this.j = paramBoolean1;
      this.k = paramInt;
      this.l = paramBoolean2;
      this.m = paramBoolean3;
    }
    
    public n c()
    {
      return this.h;
    }
    
    private boolean d()
    {
      if (g.Cc == 0) {}
      return k() > 0;
    }
    
    public boolean e()
    {
      int n = g.Cc;
      z localz = ((o)i().c()).o(this.i);
      if (n == 0) {
        if (d())
        {
          a.c.v localv1 = localz.b(k() - 1);
          a.d.w localw1 = (a.d.w)localv1.c();
          a.c.v localv2 = localz.b(k());
          a.d.w localw2 = (a.d.w)localv2.c();
          if (n == 0) {
            if (localw1.a() <= localw2.a()) {
              return true;
            }
          }
          return false;
        }
      }
      if (n == 0) {
        if (f()) {
          if (n != 0) {
            break label121;
          }
        }
      }
      label121:
      return g();
    }
    
    private boolean f()
    {
      z localz = ((o)i().c()).o(this.i);
      if (g.Cc == 0) {}
      return k() < localz.size() - 2;
    }
    
    public boolean g()
    {
      int n = g.Cc;
      z localz = ((o)i().c()).o(this.i);
      if (n == 0) {
        if (f())
        {
          a.c.v localv1 = localz.b(k() + 1);
          a.d.w localw1 = (a.d.w)localv1.c();
          a.c.v localv2 = localz.b(k() + 2);
          a.d.w localw2 = (a.d.w)localv2.c();
          if (n == 0) {
            if (localw1.a() <= localw2.a()) {
              return false;
            }
          }
          return true;
        }
      }
      if (n == 0) {
        if (d()) {
          if (n != 0) {
            break label123;
          }
        }
      }
      label123:
      return e();
    }
    
    public boolean h()
    {
      int n = g.Cc;
      if (n == 0) {
        if (d())
        {
          if (n != 0) {
            break label32;
          }
          if (f()) {
            break label28;
          }
        }
      }
      return true;
      label28:
      label32:
      if (n == 0) {
        if (d())
        {
          if (n != 0) {
            break label68;
          }
          if (f())
          {
            if (n != 0) {
              break label68;
            }
            if (e() != g()) {
              return true;
            }
          }
        }
      }
      label68:
      return false;
    }
    
    public a.c.d i()
    {
      return this.i;
    }
    
    public boolean j()
    {
      return this.j;
    }
    
    public int k()
    {
      return this.k;
    }
    
    public String toString()
    {
      if (g.Cc == 0) {}
      return "Edge: " + this.i.e() + " -> " + this.i.f() + ", " + (j() ? "locked" : "unlocked") + " segment " + k() + ", " + this.h.toString();
    }
    
    public boolean l()
    {
      return this.l;
    }
    
    public boolean m()
    {
      return this.m;
    }
  }
  
  private static class e_
    extends i.d_
  {
    private final i.f_ h;
    
    e_(byte paramByte, double paramDouble, i.f_ paramf_)
    {
      super(paramDouble);
      this.h = paramf_;
    }
    
    i.f_ c()
    {
      return this.h;
    }
    
    public int compareTo(Object paramObject)
    {
      int j = g.Cc;
      i.d_ locald_ = (i.d_)paramObject;
      int i = l.a(a(), locald_.a());
      if (j == 0) {
        if (i != 0) {
          return i;
        }
      }
      if (j == 0) {
        switch (b())
        {
        case 3: 
          if (j == 0) {
            switch (locald_.b())
            {
            case 3: 
              return 0;
            case 4: 
              return 1;
            }
          }
          return 0;
        case 4: 
          if (j == 0) {
            switch (locald_.b())
            {
            case 3: 
              return -1;
            case 4: 
              return 0;
            }
          }
          return 0;
        }
      }
      return 0;
    }
    
    public String toString()
    {
      if (g.Cc == 0) {}
      return "x = " + a() + ", type = " + (b() == 3 ? "Start" : "End");
    }
  }
  
  private static class g_
    extends i.d_
  {
    static final byte h = 0;
    static final byte i = 1;
    private e j;
    private n k;
    
    g_(e parame, byte paramByte)
    {
      super(0.0D);
      this.j = parame;
      zc localzc = ((o)parame.g()).d(parame);
      a.d.w localw1 = new a.d.w(localzc.a(), localzc.b());
      a.d.w localw2 = new a.d.w(localzc.a() + localzc.c(), localzc.b());
      a.d.w localw3 = new a.d.w(localzc.a(), localzc.b() + localzc.d());
      a.d.w localw4 = new a.d.w(localzc.a() + localzc.c(), localzc.b() + localzc.d());
      if (m == 0) {
        if (paramByte == 0)
        {
          a((byte)1);
          this.k = new n(localw2, localw4);
          a(this.k.d().a());
          if ((m == 0) && (g.Bc == 0)) {
            return;
          }
        }
      }
      if (paramByte == 1)
      {
        a((byte)2);
        this.k = new n(localw1, localw3);
        a(this.k.d().a());
      }
    }
    
    public e c()
    {
      return this.j;
    }
    
    public n d()
    {
      return this.k;
    }
    
    public String toString()
    {
      if (g.Cc == 0) {}
      return "Node: " + c().f() + ", Side: " + (b() == 1 ? "EAST" : "WEST");
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.i

 * JD-Core Version:    0.7.0.1

 */